package org.ccf.certified.business.shiro.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.ccf.certified.business.shiro.model.Permission;

import java.util.Set;

/**
 * @author LiuFang
 * @date 2022/1/12
 */
@Mapper
public interface IPermissionRepository extends BaseMapper<Permission> {
    /**
     *
     * 根据角色集合，查询所包含的资源
     * @param roles 角色集合
     * @return  permission资源集合
     */
    Set<Permission> findPermissionsByRoleId(@Param("roles") Set<Long> roles);
}
